<div id="buscar">
    <%= form_tag({:action=> "index"}, :method => 'get') %>
    <span style="FLOAT: left"><h1><input id="t" class="texto" onclick="javascript:restart('t')" type="text" value="Buscar Usuario..." name="search"></h1></span><input type="image" img src="/images/search.png" border="0px" align="right" style="padding-right:10px";  alt="Buscar Usuario" title="Buscar Usuario">
    </form>
</div>
<div class="post">
    <h2>Lista de Usuarios</h2>
    <br/>
    <center>
        <table border='2px' style='border-collapse:collapse'>
            <tr>
                <th align='left' width="250">
                    Nombre completo
                </th>
                <th align='left' width="200">
                    Compañia
                </th>
                <th align='left' width="150">
                    Opciones
                </th>
            </tr>
            <% @users.each do |user| %>
            <tr onmouseover="this.style.background='#BEE696'",  onmouseout="this.style.background='white'" bgcolor="white">
                <td width='250px' height="32px">
                    <%=h user.first_name %>&nbsp;&nbsp;<%=h user.last_name %>
                </td>
                <td width='150px' height="32px">
                    <%=h user.company %>
                </td>
                <td width='200px' height="32px">
                    <%= link_to '<img src="/images/profile.png" border="0px" align="left" style="padding-right:10px"; alt="Ver Perfil" title="Ver Perfiel">', user, :class=>'opacityit' %>
                    <%= link_to '<img src="/images/edit.png" border="0px" align="left" style="padding-right:10px" title="Editar Perfil">', edit_user_path(user),:class=>'opacityit' %>
                    <a href="/users/block?user=<%= user.id %>" class="opacityit"><img src="/images/lock1.png" border="0px" align="left" style="padding-right:10px" title="Editar Perfil"></a><%= link_to '<img src="/images/delete.png" border="0px" align="left" style="padding-right:10px" title="Eliminar Perfil">', user, :confirm => "Are you Sure", :method => :delete, :class => 'opacityit' %>
                </td>
            </tr><% end %>
        </table><%= will_paginate @users %>
    </center>
</div>
</div>
<div id="sidebar">
    <ul>
        <li>
            <h2>Herramientas</h2>
            <ul>
                <li>
                    <%= link_to 'Insertar Caballo', new_horse_path %>
                </li>
                <li>
                    <%= link_to 'Ver Familias', families_path %>
                </li>
                <li>
                    <%= link_to 'Ver Jefes de Razas', breedheads_path %>
                </li>
            </ul>
        </li>
    </ul>
</div>
